<template>
  <div class="home-container">
    <div class="nav-header">
      <h1>贵州公路建设项目进度计划</h1>
      <router-link to="/dashboard" class="dashboard-link">前往驾驶舱大屏</router-link>
    </div>
    <GanttChart />
  </div>
</template>

<script setup>
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import GanttChart from '../components/GanttChart.vue'

const router = useRouter()

onMounted(() => {
  console.log('首页组件已挂载')
})
</script>

<style scoped>
.home-container {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #2c80c5;
}

.nav-header h1 {
  color: #2c80c5;
  font-size: 24px;
  margin: 0;
}

.dashboard-link {
  background-color: #2c80c5;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.dashboard-link:hover {
  background-color: #216ba5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 128, 197, 0.3);
}
</style>